package com.lyf.scm.admin.domain.remote.allocationservice;

import com.github.pagehelper.PageInfo;
import com.lyf.scm.admin.api.dto.OperationLogRecordDTO;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: huangtao
 * @Description: 操作日志
 * @Date: create in 2020/10/5
 */
@FeignClient(name = "scm-plan-service")
public interface OperationLogRecordRemote {
    /**
     * 查询操作日志
     *
     * @param operationLogRecord
     * @return
     */
    @PostMapping("/api/v1/operationLogRecord/getOperationLogs")
    Response<PageInfo<OperationLogRecordDTO>> getOperationLogs(@RequestBody OperationLogRecordDTO operationLogRecord);

    /**
     * 新增操作日志数据
     *
     * @param operationDto
     * @return
     */
    @PostMapping("/api/v1/operationLogRecord/insertOperationLog")
    Response<OperationLogRecordDTO> insertOperationLog(@RequestBody OperationLogRecordDTO operationDto);

    /**
     * 编辑操作日志数据
     * @author wuyuanhang
     * @date 2020/11/16
     * @param operationDto 操作日志对象
     * @return  Response
     */
    @PutMapping("/api/v1/operationLogRecord/updateOperationLog")
    Response updateOperationLog(@RequestBody OperationLogRecordDTO operationDto);

    /**
     * 修改状态为已删除
     *
     * @param opSign
     * @return
     */
    @PostMapping("/api/v1/operationLogRecord/updateToDel")
    Response updateToDel(@RequestParam("opSign") String opSign);

    @PostMapping("/api/v1/operationLogRecord/bigData/Initiating")
    Response bigDataInitiating();

    @DeleteMapping("/api/v1/operationLogRecord")
    Response rmByOpSign(@RequestBody List<OperationLogRecordDTO> operationLogRecordDTOs);

    @PostMapping("/api/v1/operationLogRecord/opLog/Initiating")
    Response opLogInitiating(@RequestBody List<Long> ids);
}
